<div ng-if="pagedata.op == 'main'">
<div ng-if="pagedata.setting.iscms !=1" class="fe-floatback right">
		<a href="javascript:void(0);" ng-click="goback()">
		<i class="icon jinyunicon icon-back"></i>
		</a>
</div>
<div id="carousel-container" class="carousel slide" data-role="carousel" data-param-auto="true">
			<div class="carousel-inner" role="listbox" style="height:6rem">
			<div ng-class="{'item':1,'active':$index==0}" ng-repeat="item in pagedata.adv">
				
				<a href="#">
					<img src="{{tomedia(item.image) || '../core/resource/images/banner-1.jpg'}}" style="display: block; width: 100%; height: 100%;">
				</a>
			</div>
			</div>
				<style>
						.fui-swipe-page .fui-swipe-bullet {background: {background}; opacity: {opacity};}
						.fui-swipe-page .fui-swipe-bullet.active {opacity: 1;}
				</style>
				<div id="carousel-jinyun" class="fui-swipe-page" style="padding: 0 5px; bottom: 10px; ">
					<div class="fui-swipe-bullet" ng-repeat="item in pagedata.adv" ng-class="{'active':$index==0}" data-target="#carousel-container" data-slide-to="{{$index}}"></div>
				</div>
</div>
	<div class="fui-searchbar bar">
		<div ng-class="{'searchbar center':1,'searchbar-active':pagedata.searchbar ==1}">
					<input type="button" ng-click="access(pagedata.op,made_query(pagedata.params))"  value="搜索" class="searchbar-cancel searchbtn">
					<div class="search-input" ng-click="pagedata.searchbar =1">
						<input type="search" placeholder="输入关键字" class="search" ng-model="pagedata.params.keyword">
					</div>
		</div>
	</div>
	<div class="fui-tab-scroll" style="height: 4.2rem" ng-if="pagedata.groups">
			<div class="xcontainer weui_cells_radio3" style="z-index:0;height: 4.2rem;padding:0.3rem" >
			    <label class="jyui_cell_member" style="width:50px" ng-repeat="item in pagedata.groups">
					<div class="userimg" href="javascript:;" ng-click="access_json('jy_cms360/group//groupid='+item.id)">
						<img class="img-circle"  ng-src="{{tomedia(item.image) || '../core/resource/images/nopic.jpg'}}" width="50" height="50">
					</div>
					<div>
						<span style="font-size:0.3rem">{{item.title}}</span>
					</div>
				</label>
			</div>
		</div>
		<div class="fui-picturew" id="mpmansory" style="padding: {paddingtop}px {paddingleft}px; background: {background};">
                <a ng-repeat="item in pagedata.list" class="item"  style="padding: 5px;" ng-click="access_json(item.url)" ng-show="item.ishome" >
                    <div class="image" data-text='{{item.ishot}}'>
                        <img ng-src="{{tomedia(item.image) || '../core/resource/images/nopic.jpg'}}">
                        <div class="title" style="color: {titlecolor}; text-align: {titlealign};">{{item.title}}</div>
						<div class="pics">{{item.readnum || 0}}n</div>
                    </div>
                </a>
		</div>
		<div ng-show="loading" class='infinite-loading'><span class='fui-preloader'></span><span style="margin-left:1.5rem"> 正在加载...</span></div>
</div>
<div class="content-empty" ng-if="pagedata.list=='' ">
		  <i class="icon jinyunicon icon-cry" style="width: 6rem;margin-bottom: 0.5rem;"></i><br/><p style="color: #999;font-size: .75rem">暂时没有数据！</p>
	</div>
<div ng-include="sys_html('_footer')"></div>
<script type="text/javascript">
scope.loading = true;
scope.scroll(function(){
		scope.$apply();
		setTimeout('getlist()',2000);
},false,'svposttext');
getlist();
var page = 1;
function getlist(){
		var params = {
					'plugin':'jy_cms360',
					'action':'index',
					'op':'list',
					'data':{
						'page':page,
					},
					'callback':function(data){
							if(data.error !=1){
							 for (var i=0;i<data.list.length;i++){
									scope.pagedata.list.push(data.list[i]);
								}
								if(page >1){
									$("#listitem").animate({scrollTop:0},300);
								}
								page++;
								scope.loading = false;
								window.scope.pagedata.list=data.list;
								scope.$apply();
								getmpmansory();
							}else{
								onsole.log('error');
							};
					}
		}
		scope.post_json(params);
}
function getmpmansory(){
	require(['bootstrap', 'hammer', 'mpmansory'], function($, Hammer){
		$('#mpmansory').mpmansory({
			childrenClass: 'item',
			columnClasses: 'pic-water',
			breakpoints:{
						lg: 3, 
						md: 4, 
						sm: 6,
						xs: 6,
			},
			distributeBy: { order: false, height: false, attr: 'data-order', attrOrder: 'asc' }, 
			onload: function (items) {
				//make somthing with items
			}
		});
		$('#carousel-container').carousel();
		var mc = new Hammer($('#carousel-container').get(0));
		mc.on("panleft", function(ev) {
			$('#carousel-container').carousel('next');
		});
		mc.on("panright", function(ev) {
			$('#carousel-container').carousel('prev');
		});
});
}

</script>